.class public Lcom/estrongs/android/scanner/job/ESMediaStoreContentJob;
.super Landroid/app/job/JobService;
.source "ESMediaStoreContentJob.java"


# annotations
.annotation build Landroid/annotation/TargetApi;
    value = 0x18
.end annotation

.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/estrongs/android/scanner/job/ESMediaStoreContentJob$c;
    }
.end annotation


# static fields
.field private static final b:Landroid/app/job/JobInfo;

.field private static c:J

.field private static d:J

.field private static final e:Landroid/net/Uri;

.field private static final f:Landroid/net/Uri;

.field private static final g:Landroid/net/Uri;

.field private static final h:Landroid/net/Uri;


# instance fields
.field private final a:Landroid/os/Handler;


# direct methods
.method static constructor <clinit>()V
    .locals 4

    .line 1
    sget-object v0, Landroid/provider/MediaStore$Images$Media;->EXTERNAL_CONTENT_URI:Landroid/net/Uri;

    sput-object v0, Lcom/estrongs/android/scanner/job/ESMediaStoreContentJob;->e:Landroid/net/Uri;

    .line 2
    sget-object v0, Landroid/provider/MediaStore$Video$Media;->EXTERNAL_CONTENT_URI:Landroid/net/Uri;

    sput-object v0, Lcom/estrongs/android/scanner/job/ESMediaStoreContentJob;->f:Landroid/net/Uri;

    .line 3
    sget-object v0, Landroid/provider/MediaStore$Audio$Media;->EXTERNAL_CONTENT_URI:Landroid/net/Uri;

    sput-object v0, Lcom/estrongs/android/scanner/job/ESMediaStoreContentJob;->g:Landroid/net/Uri;

    const-string v0, "external"

    .line 4
    invoke-static {v0}, Landroid/provider/MediaStore$Files;->getContentUri(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v0

    sput-object v0, Lcom/estrongs/android/scanner/job/ESMediaStoreContentJob;->h:Landroid/net/Uri;

    .line 5
    new-instance v0, Landroid/app/job/JobInfo$Builder;

    new-instance v1, Landroid/content/ComponentName;

    const-class v2, Lcom/estrongs/android/scanner/job/ESMediaStoreContentJob;

    .line 6
    invoke-virtual {v2}, Ljava/lang/Class;->getName()Ljava/lang/String;

    move-result-object v2

    const-string v3, "com.estrongs.android.pop"

    invoke-direct {v1, v3, v2}, Landroid/content/ComponentName;-><init>(Ljava/lang/String;Ljava/lang/String;)V

    const/4 v2, 0x3

    invoke-direct {v0, v2, v1}, Landroid/app/job/JobInfo$Builder;-><init>(ILandroid/content/ComponentName;)V

    .line 7
    new-instance v1, Landroid/app/job/JobInfo$TriggerContentUri;

    sget-object v2, Lcom/estrongs/android/scanner/job/ESMediaStoreContentJob;->e:Landroid/net/Uri;

    const/4 v3, 0x1

    invoke-direct {v1, v2, v3}, Landroid/app/job/JobInfo$TriggerContentUri;-><init>(Landroid/net/Uri;I)V

    invoke-virtual {v0, v1}, Landroid/app/job/JobInfo$Builder;->addTriggerContentUri(Landroid/app/job/JobInfo$TriggerContentUri;)Landroid/app/job/JobInfo$Builder;

    .line 8
    new-instance v1, Landroid/app/job/JobInfo$TriggerContentUri;

    sget-object v2, Lcom/estrongs/android/scanner/job/ESMediaStoreContentJob;->f:Landroid/net/Uri;

    invoke-direct {v1, v2, v3}, Landroid/app/job/JobInfo$TriggerContentUri;-><init>(Landroid/net/Uri;I)V

    invoke-virtual {v0, v1}, Landroid/app/job/JobInfo$Builder;->addTriggerContentUri(Landroid/app/job/JobInfo$TriggerContentUri;)Landroid/app/job/JobInfo$Builder;

    .line 9
    new-instance v1, Landroid/app/job/JobInfo$TriggerContentUri;

    sget-object v2, Lcom/estrongs/android/scanner/job/ESMediaStoreContentJob;->g:Landroid/net/Uri;

    invoke-direct {v1, v2, v3}, Landroid/app/job/JobInfo$TriggerContentUri;-><init>(Landroid/net/Uri;I)V

    invoke-virtual {v0, v1}, Landroid/app/job/JobInfo$Builder;->addTriggerContentUri(Landroid/app/job/JobInfo$TriggerContentUri;)Landroid/app/job/JobInfo$Builder;

    .line 10
    new-instance v1, Landroid/app/job/JobInfo$TriggerContentUri;

    sget-object v2, Lcom/estrongs/android/scanner/job/ESMediaStoreContentJob;->h:Landroid/net/Uri;

    invoke-direct {v1, v2, v3}, Landroid/app/job/JobInfo$TriggerContentUri;-><init>(Landroid/net/Uri;I)V

    invoke-virtual {v0, v1}, Landroid/app/job/JobInfo$Builder;->addTriggerContentUri(Landroid/app/job/JobInfo$TriggerContentUri;)Landroid/app/job/JobInfo$Builder;

    .line 11
    invoke-virtual {v0}, Landroid/app/job/JobInfo$Builder;->build()Landroid/app/job/JobInfo;

    move-result-object v0

    sput-object v0, Lcom/estrongs/android/scanner/job/ESMediaStoreContentJob;->b:Landroid/app/job/JobInfo;

    return-void
.end method

.method public constructor <init>()V
    .locals 1

    .line 1
    invoke-direct {p0}, Landroid/app/job/JobService;-><init>()V

    .line 2
    new-instance v0, Lcom/estrongs/android/scanner/job/ESMediaStoreContentJob$c;

    invoke-direct {v0}, Lcom/estrongs/android/scanner/job/ESMediaStoreContentJob$c;-><init>()V

    iput-object v0, p0, Lcom/estrongs/android/scanner/job/ESMediaStoreContentJob;->a:Landroid/os/Handler;

    return-void
.end method

.method private a(I)I
    .locals 1

    const/4 v0, 0x4

    if-eq p1, v0, :cond_2

    const/16 v0, 0x8

    if-eq p1, v0, :cond_2

    const/16 v0, 0x40

    if-eq p1, v0, :cond_1

    const/16 v0, 0x80

    if-eq p1, v0, :cond_0

    const/16 v0, 0x100

    if-eq p1, v0, :cond_0

    const/16 v0, 0x200

    if-eq p1, v0, :cond_1

    const/4 p1, 0x0

    goto :goto_0

    :cond_0
    const/4 p1, 0x1

    goto :goto_0

    :cond_1
    const/4 p1, 0x3

    goto :goto_0

    :cond_2
    const/4 p1, 0x2

    :goto_0
    return p1
.end method

.method static synthetic a(Lcom/estrongs/android/scanner/job/ESMediaStoreContentJob;)Landroid/os/Handler;
    .locals 0

    .line 2
    iget-object p0, p0, Lcom/estrongs/android/scanner/job/ESMediaStoreContentJob;->a:Landroid/os/Handler;

    return-object p0
.end method

.method private a()V
    .locals 3

    .line 30
    iget-object v0, p0, Lcom/estrongs/android/scanner/job/ESMediaStoreContentJob;->a:Landroid/os/Handler;

    const/4 v1, 0x2

    invoke-virtual {v0, v1}, Landroid/os/Handler;->removeMessages(I)V

    .line 31
    iget-object v0, p0, Lcom/estrongs/android/scanner/job/ESMediaStoreContentJob;->a:Landroid/os/Handler;

    const/4 v2, 0x0

    invoke-static {v2, v1}, Landroid/os/Message;->obtain(Landroid/os/Handler;I)Landroid/os/Message;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z

    return-void
.end method

.method public static a(Landroid/content/Context;)V
    .locals 1

    .line 8
    const-class v0, Landroid/app/job/JobScheduler;

    invoke-virtual {p0, v0}, Landroid/content/Context;->getSystemService(Ljava/lang/Class;)Ljava/lang/Object;

    move-result-object p0

    check-cast p0, Landroid/app/job/JobScheduler;

    const/4 v0, 0x3

    .line 9
    invoke-virtual {p0, v0}, Landroid/app/job/JobScheduler;->cancel(I)V

    return-void
.end method

.method public static a(Landroid/content/Context;Z)V
    .locals 2

    .line 3
    const-class p1, Landroid/app/job/JobScheduler;

    invoke-virtual {p0, p1}, Landroid/content/Context;->getSystemService(Ljava/lang/Class;)Ljava/lang/Object;

    move-result-object p1

    check-cast p1, Landroid/app/job/JobScheduler;

    .line 4
    sget-object v0, Lcom/estrongs/android/scanner/job/ESMediaStoreContentJob;->b:Landroid/app/job/JobInfo;

    invoke-virtual {p1, v0}, Landroid/app/job/JobScheduler;->schedule(Landroid/app/job/JobInfo;)I

    .line 5
    invoke-static {p0}, Lcom/estrongs/android/scanner/job/ESMediaStoreContentJob;->b(Landroid/content/Context;)Landroid/util/Pair;

    move-result-object p0

    .line 6
    iget-object p1, p0, Landroid/util/Pair;->first:Ljava/lang/Object;

    check-cast p1, Ljava/lang/Long;

    invoke-virtual {p1}, Ljava/lang/Long;->longValue()J

    move-result-wide v0

    sput-wide v0, Lcom/estrongs/android/scanner/job/ESMediaStoreContentJob;->c:J

    .line 7
    iget-object p0, p0, Landroid/util/Pair;->second:Ljava/lang/Object;

    check-cast p0, Ljava/lang/Long;

    invoke-virtual {p0}, Ljava/lang/Long;->longValue()J

    move-result-wide p0

    sput-wide p0, Lcom/estrongs/android/scanner/job/ESMediaStoreContentJob;->d:J

    return-void
.end method

.method private a(Landroid/net/Uri;)V
    .locals 11

    .line 10
    sget-wide v0, Lcom/estrongs/android/scanner/job/ESMediaStoreContentJob;->c:J

    .line 11
    invoke-static {p0}, Lcom/estrongs/android/scanner/job/ESMediaStoreContentJob;->b(Landroid/content/Context;)Landroid/util/Pair;

    move-result-object v2

    .line 12
    iget-object v3, v2, Landroid/util/Pair;->first:Ljava/lang/Object;

    check-cast v3, Ljava/lang/Long;

    invoke-virtual {v3}, Ljava/lang/Long;->longValue()J

    move-result-wide v3

    sget-wide v5, Lcom/estrongs/android/scanner/job/ESMediaStoreContentJob;->c:J

    sub-long/2addr v3, v5

    .line 13
    iget-object v2, v2, Landroid/util/Pair;->second:Ljava/lang/Object;

    check-cast v2, Ljava/lang/Long;

    invoke-virtual {v2}, Ljava/lang/Long;->longValue()J

    move-result-wide v5

    sget-wide v7, Lcom/estrongs/android/scanner/job/ESMediaStoreContentJob;->d:J

    sub-long/2addr v5, v7

    const-wide/16 v7, 0x0

    cmp-long v2, v3, v7

    if-lez v2, :cond_7

    cmp-long v2, v3, v5

    if-eqz v2, :cond_0

    .line 14
    invoke-direct {p0}, Lcom/estrongs/android/scanner/job/ESMediaStoreContentJob;->b()V

    .line 15
    :cond_0
    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    const-string v3, "_id>"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v2, v0, v1}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v7

    const/4 v0, 0x1

    new-array v6, v0, [Ljava/lang/String;

    const-string v1, "_data"

    const/4 v2, 0x0

    aput-object v1, v6, v2

    const/4 v1, 0x0

    .line 16
    :try_start_0
    invoke-virtual {p0}, Landroid/app/job/JobService;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v4

    const/4 v8, 0x0

    const/4 v9, 0x0

    const/4 v10, 0x0

    move-object v5, p1

    invoke-virtual/range {v4 .. v10}, Landroid/content/ContentResolver;->query(Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;Landroid/os/CancellationSignal;)Landroid/database/Cursor;

    move-result-object v1

    if-eqz v1, :cond_4

    .line 17
    :cond_1
    :goto_0
    invoke-interface {v1}, Landroid/database/Cursor;->moveToNext()Z

    move-result p1

    if-eqz p1, :cond_4

    .line 18
    invoke-interface {v1, v2}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object p1

    .line 19
    invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v3

    if-eqz v3, :cond_2

    goto :goto_0

    .line 20
    :cond_2
    invoke-static {p1}, Lcom/estrongs/android/util/h0;->c(Ljava/lang/String;)Ljava/lang/String;

    move-result-object p1

    .line 21
    new-instance v3, Ljava/io/File;

    invoke-direct {v3, p1}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    .line 22
    invoke-virtual {v3}, Ljava/io/File;->isDirectory()Z

    move-result v4

    if-eqz v4, :cond_3

    const/4 v3, 0x1

    goto :goto_1

    .line 23
    :cond_3
    invoke-virtual {v3}, Ljava/io/File;->isFile()Z

    move-result v3

    if-eqz v3, :cond_1

    const/4 v3, 0x2

    .line 24
    :goto_1
    invoke-direct {p0, p1, v3}, Lcom/estrongs/android/scanner/job/ESMediaStoreContentJob;->a(Ljava/lang/String;I)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    goto :goto_0

    :cond_4
    if-eqz v1, :cond_6

    goto :goto_2

    :catchall_0
    move-exception p1

    if-eqz v1, :cond_5

    .line 25
    invoke-interface {v1}, Landroid/database/Cursor;->close()V

    .line 26
    :cond_5
    throw p1

    :catch_0
    nop

    if-eqz v1, :cond_6

    .line 27
    :goto_2
    invoke-interface {v1}, Landroid/database/Cursor;->close()V

    :cond_6
    return-void

    :cond_7
    cmp-long p1, v3, v7

    if-nez p1, :cond_9

    cmp-long p1, v5, v7

    if-nez p1, :cond_8

    goto :goto_3

    .line 28
    :cond_8
    invoke-direct {p0}, Lcom/estrongs/android/scanner/job/ESMediaStoreContentJob;->b()V

    :goto_3
    return-void

    .line 29
    :cond_9
    invoke-direct {p0}, Lcom/estrongs/android/scanner/job/ESMediaStoreContentJob;->b()V

    return-void
.end method

.method static synthetic a(Lcom/estrongs/android/scanner/job/ESMediaStoreContentJob;Landroid/net/Uri;)V
    .locals 0

    .line 1
    invoke-direct {p0, p1}, Lcom/estrongs/android/scanner/job/ESMediaStoreContentJob;->a(Landroid/net/Uri;)V

    return-void
.end method

.method private a(Ljava/lang/String;I)V
    .locals 3

    .line 32
    new-instance v0, Landroid/os/Bundle;

    invoke-direct {v0}, Landroid/os/Bundle;-><init>()V

    const/16 v1, 0x100

    const-string v2, "operate"

    .line 33
    invoke-virtual {v0, v2, v1}, Landroid/os/Bundle;->putInt(Ljava/lang/String;I)V

    .line 34
    invoke-direct {p0, v1}, Lcom/estrongs/android/scanner/job/ESMediaStoreContentJob;->a(I)I

    move-result v1

    const-string v2, "event_id"

    invoke-virtual {v0, v2, v1}, Landroid/os/Bundle;->putInt(Ljava/lang/String;I)V

    const-string v1, "path"

    .line 35
    invoke-virtual {v0, v1, p1}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V

    const-string p1, "path_type"

    .line 36
    invoke-virtual {v0, p1, p2}, Landroid/os/Bundle;->putInt(Ljava/lang/String;I)V

    .line 37
    iget-object p1, p0, Lcom/estrongs/android/scanner/job/ESMediaStoreContentJob;->a:Landroid/os/Handler;

    const/4 p2, 0x0

    invoke-static {p1, p2}, Landroid/os/Message;->obtain(Landroid/os/Handler;I)Landroid/os/Message;

    move-result-object p1

    .line 38
    invoke-virtual {p1, v0}, Landroid/os/Message;->setData(Landroid/os/Bundle;)V

    .line 39
    iget-object p2, p0, Lcom/estrongs/android/scanner/job/ESMediaStoreContentJob;->a:Landroid/os/Handler;

    invoke-virtual {p2, p1}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z

    .line 40
    invoke-direct {p0}, Lcom/estrongs/android/scanner/job/ESMediaStoreContentJob;->a()V

    return-void
.end method

.method private static b(Landroid/content/Context;)Landroid/util/Pair;
    .locals 9
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Landroid/content/Context;",
            ")",
            "Landroid/util/Pair<",
            "Ljava/lang/Long;",
            "Ljava/lang/Long;",
            ">;"
        }
    .end annotation

    const/4 v0, 0x2

    new-array v3, v0, [Ljava/lang/String;

    const-string v0, "max(_id)"

    const/4 v7, 0x0

    aput-object v0, v3, v7

    const-string v0, "count(*)"

    const/4 v8, 0x1

    aput-object v0, v3, v8

    const/4 v0, 0x0

    .line 1
    :try_start_0
    invoke-virtual {p0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v1

    const-string p0, "external"

    .line 2
    invoke-static {p0}, Landroid/provider/MediaStore$Files;->getContentUri(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v2

    const/4 v4, 0x0

    const/4 v5, 0x0

    const/4 v6, 0x0

    .line 3
    invoke-virtual/range {v1 .. v6}, Landroid/content/ContentResolver;->query(Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;

    move-result-object v0

    if-eqz v0, :cond_1

    .line 4
    invoke-interface {v0}, Landroid/database/Cursor;->moveToFirst()Z

    move-result p0

    if-eqz p0, :cond_1

    .line 5
    invoke-interface {v0, v7}, Landroid/database/Cursor;->getLong(I)J

    move-result-wide v1

    .line 6
    invoke-interface {v0, v8}, Landroid/database/Cursor;->getLong(I)J

    move-result-wide v3

    .line 7
    new-instance p0, Landroid/util/Pair;

    invoke-static {v1, v2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v1

    invoke-static {v3, v4}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v2

    invoke-direct {p0, v1, v2}, Landroid/util/Pair;-><init>(Ljava/lang/Object;Ljava/lang/Object;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    if-eqz v0, :cond_0

    .line 8
    invoke-interface {v0}, Landroid/database/Cursor;->close()V

    :cond_0
    return-object p0

    :cond_1
    if-eqz v0, :cond_3

    goto :goto_0

    :catchall_0
    move-exception p0

    if-eqz v0, :cond_2

    invoke-interface {v0}, Landroid/database/Cursor;->close()V

    .line 9
    :cond_2
    throw p0

    :catch_0
    nop

    if-eqz v0, :cond_3

    .line 10
    :goto_0
    invoke-interface {v0}, Landroid/database/Cursor;->close()V

    .line 11
    :cond_3
    new-instance p0, Landroid/util/Pair;

    const-wide/16 v0, 0x0

    invoke-static {v0, v1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v2

    invoke-static {v0, v1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v0

    invoke-direct {p0, v2, v0}, Landroid/util/Pair;-><init>(Ljava/lang/Object;Ljava/lang/Object;)V

    return-object p0
.end method

.method private b()V
    .locals 3

    .line 12
    new-instance v0, Landroid/os/Bundle;

    invoke-direct {v0}, Landroid/os/Bundle;-><init>()V

    const-string v1, "event_id"

    const/16 v2, 0x64

    .line 13
    invoke-virtual {v0, v1, v2}, Landroid/os/Bundle;->putInt(Ljava/lang/String;I)V

    const/4 v1, 0x0

    const/4 v2, 0x1

    .line 14
    invoke-static {v1, v2}, Landroid/os/Message;->obtain(Landroid/os/Handler;I)Landroid/os/Message;

    move-result-object v1

    .line 15
    invoke-virtual {v1, v0}, Landroid/os/Message;->setData(Landroid/os/Bundle;)V

    .line 16
    iget-object v0, p0, Lcom/estrongs/android/scanner/job/ESMediaStoreContentJob;->a:Landroid/os/Handler;

    invoke-virtual {v0, v1}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z

    .line 17
    invoke-direct {p0}, Lcom/estrongs/android/scanner/job/ESMediaStoreContentJob;->a()V

    return-void
.end method

.method public static c(Landroid/content/Context;)Z
    .locals 4

    .line 1
    const-class v0, Landroid/app/job/JobScheduler;

    invoke-virtual {p0, v0}, Landroid/content/Context;->getSystemService(Ljava/lang/Class;)Ljava/lang/Object;

    move-result-object p0

    check-cast p0, Landroid/app/job/JobScheduler;

    .line 2
    invoke-virtual {p0}, Landroid/app/job/JobScheduler;->getAllPendingJobs()Ljava/util/List;

    move-result-object p0

    const/4 v0, 0x0

    if-nez p0, :cond_0

    return v0

    :cond_0
    const/4 v1, 0x0

    .line 3
    :goto_0
    invoke-interface {p0}, Ljava/util/List;->size()I

    move-result v2

    if-ge v1, v2, :cond_2

    .line 4
    invoke-interface {p0, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Landroid/app/job/JobInfo;

    invoke-virtual {v2}, Landroid/app/job/JobInfo;->getId()I

    move-result v2

    const/4 v3, 0x3

    if-ne v2, v3, :cond_1

    const/4 p0, 0x1

    return p0

    :cond_1
    add-int/lit8 v1, v1, 0x1

    goto :goto_0

    :cond_2
    return v0
.end method


# virtual methods
.method public onCreate()V
    .locals 2

    .line 1
    invoke-super {p0}, Landroid/app/job/JobService;->onCreate()V

    .line 2
    invoke-static {}, Lcom/estrongs/android/util/b;->a()Z

    move-result v0

    if-eqz v0, :cond_0

    .line 3
    invoke-virtual {p0}, Landroid/app/job/JobService;->getApplicationContext()Landroid/content/Context;

    move-result-object v0

    const-string v1, "f_job_c"

    invoke-static {v0, v1}, Lcom/estrongs/android/util/b;->a(Landroid/content/Context;Ljava/lang/String;)V

    .line 4
    invoke-virtual {p0}, Landroid/app/job/JobService;->stopSelf()V

    :cond_0
    return-void
.end method

.method public onDestroy()V
    .locals 0

    .line 1
    invoke-super {p0}, Landroid/app/job/JobService;->onDestroy()V

    return-void
.end method

.method public onStartJob(Landroid/app/job/JobParameters;)Z
    .locals 8

    .line 1
    new-instance v0, Lcom/estrongs/android/scanner/job/ESMediaStoreContentJob$a;

    invoke-direct {v0, p0, p1}, Lcom/estrongs/android/scanner/job/ESMediaStoreContentJob$a;-><init>(Lcom/estrongs/android/scanner/job/ESMediaStoreContentJob;Landroid/app/job/JobParameters;)V

    .line 2
    invoke-static {}, Lcom/estrongs/android/util/b;->a()Z

    move-result v1

    const/4 v2, 0x1

    if-eqz v1, :cond_0

    .line 3
    invoke-virtual {p0}, Landroid/app/job/JobService;->getApplicationContext()Landroid/content/Context;

    move-result-object p1

    const-string v1, "f_job_s"

    invoke-static {p1, v1}, Lcom/estrongs/android/util/b;->a(Landroid/content/Context;Ljava/lang/String;)V

    .line 4
    iget-object p1, p0, Lcom/estrongs/android/scanner/job/ESMediaStoreContentJob;->a:Landroid/os/Handler;

    invoke-virtual {p1, v0}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z

    return v2

    .line 5
    :cond_0
    invoke-static {p0}, Lcom/permission/runtime/f;->b(Landroid/content/Context;)Z

    move-result v1

    if-nez v1, :cond_1

    .line 6
    iget-object p1, p0, Lcom/estrongs/android/scanner/job/ESMediaStoreContentJob;->a:Landroid/os/Handler;

    invoke-virtual {p1, v0}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z

    return v2

    .line 7
    :cond_1
    invoke-virtual {p1}, Landroid/app/job/JobParameters;->getTriggeredContentAuthorities()[Ljava/lang/String;

    move-result-object v1

    const/4 v3, 0x0

    if-eqz v1, :cond_8

    invoke-virtual {p1}, Landroid/app/job/JobParameters;->getTriggeredContentUris()[Landroid/net/Uri;

    move-result-object v1

    if-nez v1, :cond_2

    goto :goto_2

    .line 8
    :cond_2
    new-instance v1, Landroid/util/ArraySet;

    invoke-direct {v1}, Landroid/util/ArraySet;-><init>()V

    .line 9
    invoke-virtual {p1}, Landroid/app/job/JobParameters;->getTriggeredContentUris()[Landroid/net/Uri;

    move-result-object v4

    array-length v5, v4

    :goto_0
    if-ge v3, v5, :cond_7

    aget-object v6, v4, v3

    .line 10
    invoke-virtual {v6}, Landroid/net/Uri;->toString()Ljava/lang/String;

    move-result-object v6

    .line 11
    sget-object v7, Lcom/estrongs/android/scanner/job/ESMediaStoreContentJob;->e:Landroid/net/Uri;

    invoke-virtual {v7}, Landroid/net/Uri;->toString()Ljava/lang/String;

    move-result-object v7

    invoke-virtual {v6, v7}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

    move-result v7

    if-eqz v7, :cond_3

    .line 12
    sget-object v6, Lcom/estrongs/android/scanner/job/ESMediaStoreContentJob;->e:Landroid/net/Uri;

    invoke-interface {v1, v6}, Ljava/util/Set;->add(Ljava/lang/Object;)Z

    goto :goto_1

    .line 13
    :cond_3
    sget-object v7, Lcom/estrongs/android/scanner/job/ESMediaStoreContentJob;->f:Landroid/net/Uri;

    invoke-virtual {v7}, Landroid/net/Uri;->toString()Ljava/lang/String;

    move-result-object v7

    invoke-virtual {v6, v7}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

    move-result v7

    if-eqz v7, :cond_4

    .line 14
    sget-object v6, Lcom/estrongs/android/scanner/job/ESMediaStoreContentJob;->f:Landroid/net/Uri;

    invoke-interface {v1, v6}, Ljava/util/Set;->add(Ljava/lang/Object;)Z

    goto :goto_1

    .line 15
    :cond_4
    sget-object v7, Lcom/estrongs/android/scanner/job/ESMediaStoreContentJob;->g:Landroid/net/Uri;

    invoke-virtual {v7}, Landroid/net/Uri;->toString()Ljava/lang/String;

    move-result-object v7

    invoke-virtual {v6, v7}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

    move-result v7

    if-eqz v7, :cond_5

    .line 16
    sget-object v6, Lcom/estrongs/android/scanner/job/ESMediaStoreContentJob;->g:Landroid/net/Uri;

    invoke-interface {v1, v6}, Ljava/util/Set;->add(Ljava/lang/Object;)Z

    goto :goto_1

    .line 17
    :cond_5
    sget-object v7, Lcom/estrongs/android/scanner/job/ESMediaStoreContentJob;->h:Landroid/net/Uri;

    invoke-virtual {v7}, Landroid/net/Uri;->toString()Ljava/lang/String;

    move-result-object v7

    invoke-virtual {v6, v7}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

    move-result v6

    if-eqz v6, :cond_6

    .line 18
    sget-object v6, Lcom/estrongs/android/scanner/job/ESMediaStoreContentJob;->h:Landroid/net/Uri;

    invoke-interface {v1, v6}, Ljava/util/Set;->add(Ljava/lang/Object;)Z

    :cond_6
    :goto_1
    add-int/lit8 v3, v3, 0x1

    goto :goto_0

    .line 19
    :cond_7
    new-instance v3, Lcom/estrongs/android/scanner/job/ESMediaStoreContentJob$b;

    invoke-direct {v3, p0, v1, v0, p1}, Lcom/estrongs/android/scanner/job/ESMediaStoreContentJob$b;-><init>(Lcom/estrongs/android/scanner/job/ESMediaStoreContentJob;Ljava/util/Set;Ljava/lang/Runnable;Landroid/app/job/JobParameters;)V

    invoke-static {v3}, Lcom/estrongs/android/util/o;->a(Ljava/lang/Runnable;)V

    .line 20
    iget-object p1, p0, Lcom/estrongs/android/scanner/job/ESMediaStoreContentJob;->a:Landroid/os/Handler;

    const-wide/32 v3, 0x927c0

    invoke-virtual {p1, v0, v3, v4}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z

    return v2

    :cond_8
    :goto_2
    return v3
.end method

.method public onStopJob(Landroid/app/job/JobParameters;)Z
    .locals 2

    .line 1
    iget-object p1, p0, Lcom/estrongs/android/scanner/job/ESMediaStoreContentJob;->a:Landroid/os/Handler;

    const/4 v0, 0x2

    invoke-virtual {p1, v0}, Landroid/os/Handler;->removeMessages(I)V

    .line 2
    iget-object p1, p0, Lcom/estrongs/android/scanner/job/ESMediaStoreContentJob;->a:Landroid/os/Handler;

    const/4 v0, 0x0

    invoke-virtual {p1, v0}, Landroid/os/Handler;->removeMessages(I)V

    .line 3
    iget-object p1, p0, Lcom/estrongs/android/scanner/job/ESMediaStoreContentJob;->a:Landroid/os/Handler;

    const/4 v1, 0x1

    invoke-virtual {p1, v1}, Landroid/os/Handler;->removeMessages(I)V

    return v0
.end method
